//这是入口文件

//导入 vue 包
import Vue from 'vue'

//导入路由的包
import VueRouter from 'vue-router'
//安装路由模块
Vue.use(VueRouter)

import VueResource from 'vue-resource'
Vue.use(VueResource)
Vue.http.options.root = 'http://www.escook.cn:3000/'
Vue.http.options.emulateJSON = true

import VuePreview from 'vue-preview'
Vue.use(VuePreview)

import moment from 'moment'

Vue.filter("dateFormat", function(datastr, pattern = "YYYY-MM-DD hh:mm:ss") {
    return moment(datastr).format(pattern)
})


//按需导入 mint-ui
// import { Header, Swipe, SwipeItem, Button } from 'mint-ui'
// Vue.component(Header.name, Header)
// Vue.component(Swipe.name, Swipe)
// Vue.component(SwipeItem.name, SwipeItem)
// Vue.component(Button.name, Button)

import Mintui from 'mint-ui'
Vue.use(Mintui)



//导入 mui 的样式
import './lib/mui/css/mui.min.css'
import "./lib/mui/css/icons-extra.css"



//导入 APP 组件
import app from './App.vue'

//导入路由组件
import router from './router.js'

const vm = new Vue({
    el: "#app",
    render: c => c(app),
    router
})